//
//  UIButton+XMExtension.m
//  sinaWeiBo
//
//  Created by 孟发 on 4/9/16.
//  Copyright © 2016 夏孟发. All rights reserved.
//

#import "UIButton+XMExtension.h"

@implementation UIButton (XMExtension)
//
//- (instancetype)init{
//    
//}
//
/** 封装创建按钮的方法 */
+ (instancetype)setupButton:(NSString *)title color:(UIColor *)color imageName:(NSString *)imageName{
    
        UIButton *button = [[UIButton alloc] init];
        [button setTitle:title forState:UIControlStateNormal];
        [button setTitleColor:color forState:UIControlStateNormal];
        [button setBackgroundImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
    
    return button;

}

@end
